package cn.edu.ustc.xrovers.model;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table
public class GuaranteeWay {

	private Integer id;
	private String guaWay;//担保方式
	private Set<Loan> loans=new HashSet<Loan>();
	
	@Column(name="Gua_way")
	public String getGuaWay() {
		return guaWay;
	}
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Integer getId() {
		return id;
	}
	@OneToMany(mappedBy="guaWay")
	public Set<Loan> getLoans() {
		return loans;
	}
	
	/*set方法*/
	public void setGuaWay(String guaWay) {
		this.guaWay = guaWay;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public void setLoans(Set<Loan> loans) {
		this.loans = loans;
	}
}
